package com.huanliscloud.controller;

import com.huanlis.cloud.utils.R;
import org.springframework.messaging.simp.SimpMessagingTemplate;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author lihuan
 * @since 2024/06/02 10:52:48
 */
@RestController
@RequestMapping("/websocket/stomp")
public class StompController {

//    @Autowired
//    private SimpMessagingTemplate messagingTemplate;

    @PostMapping("/test")
    public R test(@RequestParam String msg) {
//        messagingTemplate.convertAndSend(JSON.toJSONString(R.success(msg)));
        return R.success(msg);
    }




}
